package com.rgz.pojo;

import java.util.ArrayList;
import java.util.List;

public class AccidentExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public AccidentExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andAccidentidIsNull() {
            addCriterion("accidentid is null");
            return (Criteria) this;
        }

        public Criteria andAccidentidIsNotNull() {
            addCriterion("accidentid is not null");
            return (Criteria) this;
        }

        public Criteria andAccidentidEqualTo(Integer value) {
            addCriterion("accidentid =", value, "accidentid");
            return (Criteria) this;
        }

        public Criteria andAccidentidNotEqualTo(Integer value) {
            addCriterion("accidentid <>", value, "accidentid");
            return (Criteria) this;
        }

        public Criteria andAccidentidGreaterThan(Integer value) {
            addCriterion("accidentid >", value, "accidentid");
            return (Criteria) this;
        }

        public Criteria andAccidentidGreaterThanOrEqualTo(Integer value) {
            addCriterion("accidentid >=", value, "accidentid");
            return (Criteria) this;
        }

        public Criteria andAccidentidLessThan(Integer value) {
            addCriterion("accidentid <", value, "accidentid");
            return (Criteria) this;
        }

        public Criteria andAccidentidLessThanOrEqualTo(Integer value) {
            addCriterion("accidentid <=", value, "accidentid");
            return (Criteria) this;
        }

        public Criteria andAccidentidIn(List<Integer> values) {
            addCriterion("accidentid in", values, "accidentid");
            return (Criteria) this;
        }

        public Criteria andAccidentidNotIn(List<Integer> values) {
            addCriterion("accidentid not in", values, "accidentid");
            return (Criteria) this;
        }

        public Criteria andAccidentidBetween(Integer value1, Integer value2) {
            addCriterion("accidentid between", value1, value2, "accidentid");
            return (Criteria) this;
        }

        public Criteria andAccidentidNotBetween(Integer value1, Integer value2) {
            addCriterion("accidentid not between", value1, value2, "accidentid");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeIsNull() {
            addCriterion("accidenttype is null");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeIsNotNull() {
            addCriterion("accidenttype is not null");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeEqualTo(String value) {
            addCriterion("accidenttype =", value, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeNotEqualTo(String value) {
            addCriterion("accidenttype <>", value, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeGreaterThan(String value) {
            addCriterion("accidenttype >", value, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeGreaterThanOrEqualTo(String value) {
            addCriterion("accidenttype >=", value, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeLessThan(String value) {
            addCriterion("accidenttype <", value, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeLessThanOrEqualTo(String value) {
            addCriterion("accidenttype <=", value, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeLike(String value) {
            addCriterion("accidenttype like", value, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeNotLike(String value) {
            addCriterion("accidenttype not like", value, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeIn(List<String> values) {
            addCriterion("accidenttype in", values, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeNotIn(List<String> values) {
            addCriterion("accidenttype not in", values, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeBetween(String value1, String value2) {
            addCriterion("accidenttype between", value1, value2, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andAccidenttypeNotBetween(String value1, String value2) {
            addCriterion("accidenttype not between", value1, value2, "accidenttype");
            return (Criteria) this;
        }

        public Criteria andReservedIsNull() {
            addCriterion("reserved is null");
            return (Criteria) this;
        }

        public Criteria andReservedIsNotNull() {
            addCriterion("reserved is not null");
            return (Criteria) this;
        }

        public Criteria andReservedEqualTo(String value) {
            addCriterion("reserved =", value, "reserved");
            return (Criteria) this;
        }

        public Criteria andReservedNotEqualTo(String value) {
            addCriterion("reserved <>", value, "reserved");
            return (Criteria) this;
        }

        public Criteria andReservedGreaterThan(String value) {
            addCriterion("reserved >", value, "reserved");
            return (Criteria) this;
        }

        public Criteria andReservedGreaterThanOrEqualTo(String value) {
            addCriterion("reserved >=", value, "reserved");
            return (Criteria) this;
        }

        public Criteria andReservedLessThan(String value) {
            addCriterion("reserved <", value, "reserved");
            return (Criteria) this;
        }

        public Criteria andReservedLessThanOrEqualTo(String value) {
            addCriterion("reserved <=", value, "reserved");
            return (Criteria) this;
        }

        public Criteria andReservedLike(String value) {
            addCriterion("reserved like", value, "reserved");
            return (Criteria) this;
        }

        public Criteria andReservedNotLike(String value) {
            addCriterion("reserved not like", value, "reserved");
            return (Criteria) this;
        }

        public Criteria andReservedIn(List<String> values) {
            addCriterion("reserved in", values, "reserved");
            return (Criteria) this;
        }

        public Criteria andReservedNotIn(List<String> values) {
            addCriterion("reserved not in", values, "reserved");
            return (Criteria) this;
        }

        public Criteria andReservedBetween(String value1, String value2) {
            addCriterion("reserved between", value1, value2, "reserved");
            return (Criteria) this;
        }

        public Criteria andReservedNotBetween(String value1, String value2) {
            addCriterion("reserved not between", value1, value2, "reserved");
            return (Criteria) this;
        }

        public Criteria andReserved2IsNull() {
            addCriterion("reserved2 is null");
            return (Criteria) this;
        }

        public Criteria andReserved2IsNotNull() {
            addCriterion("reserved2 is not null");
            return (Criteria) this;
        }

        public Criteria andReserved2EqualTo(String value) {
            addCriterion("reserved2 =", value, "reserved2");
            return (Criteria) this;
        }

        public Criteria andReserved2NotEqualTo(String value) {
            addCriterion("reserved2 <>", value, "reserved2");
            return (Criteria) this;
        }

        public Criteria andReserved2GreaterThan(String value) {
            addCriterion("reserved2 >", value, "reserved2");
            return (Criteria) this;
        }

        public Criteria andReserved2GreaterThanOrEqualTo(String value) {
            addCriterion("reserved2 >=", value, "reserved2");
            return (Criteria) this;
        }

        public Criteria andReserved2LessThan(String value) {
            addCriterion("reserved2 <", value, "reserved2");
            return (Criteria) this;
        }

        public Criteria andReserved2LessThanOrEqualTo(String value) {
            addCriterion("reserved2 <=", value, "reserved2");
            return (Criteria) this;
        }

        public Criteria andReserved2Like(String value) {
            addCriterion("reserved2 like", value, "reserved2");
            return (Criteria) this;
        }

        public Criteria andReserved2NotLike(String value) {
            addCriterion("reserved2 not like", value, "reserved2");
            return (Criteria) this;
        }

        public Criteria andReserved2In(List<String> values) {
            addCriterion("reserved2 in", values, "reserved2");
            return (Criteria) this;
        }

        public Criteria andReserved2NotIn(List<String> values) {
            addCriterion("reserved2 not in", values, "reserved2");
            return (Criteria) this;
        }

        public Criteria andReserved2Between(String value1, String value2) {
            addCriterion("reserved2 between", value1, value2, "reserved2");
            return (Criteria) this;
        }

        public Criteria andReserved2NotBetween(String value1, String value2) {
            addCriterion("reserved2 not between", value1, value2, "reserved2");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}